﻿Public Class HinhThucThue
    Public Shared Function them(ByVal tenht As String) As Boolean
        tenht = EscapeString(tenht)
        Return db.Query("INSERT INTO HinhThucThue(TenHT)VALUES(N'" + tenht + "')")
    End Function
    Public Shared Function dsht() As DataTable
        Return db.QueryTable("SELECT * FROM HinhThucThue")
    End Function
    Public Shared Function capnhat(ByVal maht As String, ByVal tenht As String) As Boolean
        maht = EscapeString(maht)
        tenht = EscapeString(tenht)
        Return db.Query("UPDATE HinhThucThue SET TenHT = N'" + tenht + "'WHERE MaHT = '" + maht + "'")
    End Function
    Public Shared Function xoa(ByVal maht As String) As Boolean
        maht = EscapeString(maht)
        Return db.Query("DELETE FROM HinhThucThue WHERE MaHT = '" + maht + "'")

    End Function
    Public Shared Function timkiem(ByVal tukhoa As String) As DataTable
        tukhoa = EscapeString(tukhoa)
        Return db.QueryTable("SELECT * FROM HinhThucThue WHERE MaHT like '%" + tukhoa + "%'or TenHT like '%" + tukhoa + "%' ")
    End Function

End Class
